x86: avoid HPET use on certain Intel platforms
authorJan Beulich <jbeulich@suse.com>
Tue, 3 Dec 2019 13:14:44 +0000 (14:14 +0100)
committerJan Beulich <jbeulich@suse.com>
Tue, 3 Dec 2019 13:14:44 +0000 (14:14 +0100)
commitd5294a302c8441191d47888452958aea25243723
treed9f6794b7d70b80a9e847e6b20775c30dc1db3f4
parent921f1f42260c7967bf18f8a143d39511d163c421
x86: avoid HPET use on certain Intel platforms

Linux commit fc5db58539b49351e76f19817ed1102bf7c712d0 says

"Some Coffee Lake platforms have a skewed HPET timer once the SoCs entered
 PC10, which in consequence marks TSC as unstable because HPET is used as
 watchdog clocksource for TSC."

Follow this for Xen as well. Looking at its patch context made me notice
they have a pre-existing quirk for Bay Trail as well. The comment there,
however, points at a Cherry Trail document. Looking at the datasheets of
both, there appear to be similar issues, so go beyond Linux'es coverage
and exclude both. Also key the disable on the PCI IDs of the actual
affected devices, rather than those of 00:00.0.

Apply the workarounds only when the use of HPET was not explicitly
requested on the command line and when use of (deep) C-states was not
disabled.

Adjust a few types in touched or nearby code at the same time.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/arch/x86/time.c